package com.tesserate.pmt;
import com.tesserate.game.api.ControllerDevice;
import com.tesserate.game.api.GameCore;
import com.tesserate.game.api.fs.Resource;
import com.tesserate.game.api.sound.SoundManager;
import com.tesserate.game.api.ui.FullScreenDevice;
import com.tesserate.game.api.ui.NullRepaintManager;
import com.tesserate.game.api.ui.SceneGraph;

public class PokerManagerTimer extends GameCore {
	Lobby lobby;
	BlindManagerLobby blinds;
	@Override
	public void init() {
		FullScreenDevice.getInstance().setController(ControllerDevice.getInstance());
		FullScreenDevice.getInstance().init();
		LoadFilesResources.loadFiles();
		blinds = BlindManagerLobby.getInstance();
		
		SoundManager soundManager = SoundManager.getInstance(); 
		soundManager.getSound("alarme", Resource.loadFile("sounds/alarm_7.wav"));
		lobby = Lobby.getInstance();
		lobby.setX(0);
		lobby.setY(0);
		lobby.setVisivel(true);
		SceneGraph.getInstance().add(lobby);
		SceneGraph.getInstance().add(blinds);
		NullRepaintManager.install();
	}

	@Override
	public void render() {
		FullScreenDevice.getInstance().render();
	}

	@Override
	public void update(long elapsedTime) {
		lobby.update(elapsedTime);

	}

	public static void main(String[] args) {
		try{
			new PokerManagerTimer();
		}catch (Exception e) {
			e.printStackTrace();
			System.exit(0);
		}
	}

}
